#ifndef __STRINGS_HPP__
#define __STRINGS_HPP__

/**
 *  This file is part of PennerBot
 *
 *  Copyright (C) 2010 microkernel
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#include <map>

#include <core/config.hpp>
#include <core/regex.hpp>

#include <boost/thread/recursive_mutex.hpp>

namespace PBot
{
namespace Core
{

class Strings
{
private:
    Strings();
    Strings(Strings& cc);
    ~Strings();

public:
    static Strings& GetInstance();
    static void Destroy();

    enum String
    {
        LOGIN_WRONGPASS,
        LOGIN_PASSED,

        BC_JUNKID_FRONT,
        BC_JUNKID_BACK,
        BC_JUNKENGINE,
        BC_SHOPPINGCART,

        BS_MAX,
        BS_SUM,
        BS_BUTTON,

#ifdef PBOT_SPECIAL

        AS_ATT,
        AS_DEF,
        AS_DEX,
        AS_SPEECH,
        AS_EDU,
        AS_MUSIC,
        AS_SOCIAL,
        AS_CONCENTRATION,
        AS_PICKPOCKET,

#endif /* PBOT_SPECIAL */
    };

    enum Regexes
    {
        LOGIN_USERNAME,
        LOGIN_PASSWORD,
        LOGIN_CITY,

        BC_CAPTCHAURL,
        BC_COUNTER,
        BC_FIGHTCOUNTER,
        BC_CRIMECOUNTER,
        BC_FORMCHECK,
        BC_CONCENTRATION,
        BC_FORMCONC,
        BC_FORMACTION,
        BC_OLDJUNK,
        BC_JUNKENGINE_RX,
        BC_JUNKFORMACTION,
        BC_JUNKFORMID,
        BC_CART_TYPE,
        BC_CART_PENDING,
        BC_CART_SUBMIT,
        BC_CART_ACTION,

        BS_CONTAINER,
        BS_MONEY,
        BS_EXCHANGERATE,
        BS_BOTTLECOUNT,
        BS_ACTION,
        BS_CHKVAL,

#ifdef PBOT_SPECIAL

        AS_SKILLCOUNTER,

#endif /* PBOT_SPECIAL */

    };

    const char* GetString(Config::Games, String);
    Regex* GetRegex(Config::Games, Regexes);

private:
    static Strings* instance;

    std::vector<std::map<String, const char*> > strings;
    std::vector<std::map<Regexes, Regex*> > regexes;


    boost::recursive_mutex mutex;

};

}
}


#endif // __STRINGS_HPP__
